<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			
			<div v-if="isLogin" class="login">
				<h3>登录</h3>
				<div >
					用户名:<input type="text" name=""username  value=""/>
				</div>
				<div >
					密码:<input type="password" name="password"  value=""/>
				</div>
				<button type="button">登录</button>
			</div>
			<div v-else class="register">
				<h3>注册</h3>
				<div >
					用户名:<input type="text" name=""username  value=""/>
				</div>
				<div >
					密码:<input type="password" name="password"  value=""/>
				</div>
				<button type="button">注册</button>
			</div>
			<button @click="togglePage" type="button">切换登录注册</button>
		</div>
		
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		
	<script type="text/javascript">
		let app=new Vue({
			el:"#app",
			data:{
				isLogin:true,
			},
			methods:{
				togglePage:()=>{
					app.isLogin=!app.isLogin;
				}
			}
		})
	</script>
	</body>
</html>
